unit Rails.Languages;

interface

uses
  Rails.Languages.Values;

var
  RailsMessage: TLangDefault;

implementation

uses
  System.IniFiles, System.Classes, System.SysUtils, RTTI;

var
  RailsConfig: TIniFile;
  Ctx: TRttiContext;
  Typ: TRttiInstanceType;

initialization
  {$Message Warn 'Implementar Languages'}
  RailsConfig := TIniFile.Create(ExtractFilePath(ParamStr(0))+'\Language.ini');
  Ctx := TRttiContext.Create;
  Typ := TRttiInstanceType(Ctx.GetType(GetClass(RailsConfig.ReadString('CONFIG', 'Language', 'TLangDefault'))));
  RailsMessage := TLangDefault(Typ.MetaclassType.Create);
  FreeAndNil(RailsConfig);
finalization
  FreeAndNil(RailsMessage);

end.
